#!/bin/bash

hostnamectl set-hostname k8s-node1


# 2.添加host
cat >> /etc/hosts << EOF
192.168.1.73 k8s-master
192.168.1.152 k8s-node1
192.168.1.245 k8s-node2
EOF

kubeadm join k8s-master:6443 --token 1vpqda.t0ws57wiiogadc58 \
	--discovery-token-ca-cert-hash sha256:6e4e100441f40a42b57829f738633f2c136fa2e67d6476b1d2891552abfd1461 --cri-socket=unix:///var/run/cri-dockerd.sock